﻿using GalaSoft.MvvmLight;
using Reuse.PCL.Services;
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace Reuse.WS.Services {
	public partial class NavigationService : INavigationService {


		public NavigationService() {
		}

		public void Navigate( Type sourcePageType ) {
            if ( !ViewModelBase.IsInDesignModeStatic )
            {
                ( ( Frame )Window.Current.Content ).Navigate( sourcePageType );
            }
		}

		public bool Navigate(string route) {
			return ( (Frame)Window.Current.Content ).Navigate( WSRoutingTable[route] );
		}

		public bool Navigate( string route, string parameter ) {
			return ( (Frame)Window.Current.Content ).Navigate( WSRoutingTable[route], parameter );
		}

		public void Navigate( Type sourcePageType, object parameter ) {
			( (Frame)Window.Current.Content ).Navigate( sourcePageType, parameter );
		}

		public void GoBack() {
			( (Frame)Window.Current.Content ).GoBack();
		}

        public void GoForward()
        {
            ((Frame)Window.Current.Content).GoForward();
        }

		public System.Collections.Generic.Dictionary<string, Type> WSRoutingTable { get; set; }


		public System.Collections.Generic.Dictionary<string, Uri> WPRoutingTable {
			get {
				throw new NotImplementedException();
			}
			set {
				throw new NotImplementedException();
			}
		}

		public bool CanGoBack {
			get { throw new NotImplementedException(); }
		}

		public bool Navigate( Uri source ) {
			throw new NotImplementedException();
		}

		public bool RecoveredFromTombstoning {
			get {
				throw new NotImplementedException();
			}
			set {
				throw new NotImplementedException();
			}
		}

		public void UpdateTombstonedPageTracking( Uri pageUri ) {
			throw new NotImplementedException();
		}

		public bool DoesPageNeedtoRecoverFromTombstoning( Uri pageUri ) {
			throw new NotImplementedException();
		}
    }
}
